import request from '@/utils/request'

// 通过微信code获取微信用户信息
export function wxLogin(data) {
  return request({
    url: '/wx/loginWechat',
    method: 'get',
	params: data
  })
}

// 通过openId 获取微信用户信息
export function getWxUserDetail(data) {
  return request({
    url: '/wx/getWxUserDetail',
    method: 'get',
	params: data
  })
}

// 授权获取手机号码
export function getWechatPhone(data) {
  return request({
    url: '/wx/getWechatPhone',
    method: 'get',
	params: data
  })
}

// 保存wifi信息
export function saveWifi(data) {
  return request({
    url: '/wx/saveWifi',
    method: 'post',
	data: data
  })
}

// 修改wifi信息
export function updateWifi(data) {
  return request({
    url: '/wx/updateWifi',
    method: 'put',
	data: data
  })
}

// 获取wifi列表
export function getMyWifi(data) {
  return request({
    url: '/wx/getWifiListByUnionId',
    method: 'get',
	params: data
  })
}

// 获取wifi详情信息
export function getWifiDetail(data) {
  return request({
    url: '/wx/getWifiDetail',
    method: 'get',
	params: data
  })
}

// 删除Wifi信息
export function deleteWifi(data) {
  return request({
    url: '/wx/deleteWifi',
    method: 'delete',
	params: data
  })
}
